<script>
	export default {
		onLaunch: function() {
			this.$websocket.initWebsocket()
		},
		onShow: function() {
			let token=uni.getStorageSync('token')
			if(!token){//没有token
				uni.reLaunch({ url: '/pages/user/userLogin' })
			}
		},
		onHide: function() {
		}
	}
</script>

<style>
* {
		margin: 0;
		padding: 0;
		box-sizing: border-box;
	}

	.wrap {
		width: 750rpx;
		min-height: 100vh;
		margin: 0 auto;
		color: #333;
		background: #F8F8F8;
	}

	/*每个页面公共css */
	.flex {
		display: flex;
	}

	.flex-row {
		display: flex;
		flex-flow: row;
	}

	.flex-column {
		display: flex;
		flex-flow: column;
	}

	.align-center {
		align-items: center;
	}

	.align-end {
		align-items: flex-end;
	}

	.just-center {
		justify-content: center;
	}

	.just-end {
		justify-content: flex-end;
	}

	.just-between {
		justify-content: space-between;
	}

	.just-around {
		justify-content: space-around;
	}

	.head-icon {
		width: 8rpx;
		height: 36rpx;
		border-radius: 4rpx;
		background: #2E56EB;
	}

	.image-right {
		width: 16rpx;
		height: 28rpx;
	}

	.image-bottom {
		width: 26rpx;
		height: 16rpx;
	}
</style>

<style lang="scss">
	@for $i from 0 through 500 {
		.image#{$i} {
			width: $i * 2 + rpx !important;
			height: $i * 2 + rpx !important;
		}

		.image#{$i}-bora {
			width: $i * 2 + rpx !important;
			height: $i * 2 + rpx !important;
			border-radius: 50%;
		}
	}

	@for $i from 0 through 300 {
		.m-l-#{$i} {
			margin-left: $i * 2 + rpx !important;
		}

		.m-r-#{$i} {
			margin-right: $i * 2 + rpx !important;
		}

		.m-t-#{$i} {
			margin-top: $i * 2 + rpx !important;
		}

		.m-b-#{$i} {
			margin-bottom: $i * 2 + rpx !important;
		}

		.m-#{i} {
			margin: $i * 2 + rpx !important;
		}

		.p-l-#{$i} {
			padding-left: $i * 2 + rpx !important;
		}

		.p-r-#{$i} {
			padding-right: $i * 2 + rpx !important;
		}

		.p-t-#{$i} {
			padding-top: $i * 2 + rpx !important;
		}

		.p-b-#{$i} {
			padding-bottom: $i * 2 + rpx !important;
		}

		.p-#{$i} {
			padding: $i * 2 + rpx !important;
		}
	}

	@for $i from 0 through 300 {
		@for $j from 0 through 300 {
			$top-bottom: $i * 2rpx;
			$left-right: $j * 2rpx;

			.m-#{$i}-#{$j} {
				margin: $top-bottom $left-right;
			}

			.p-#{$i}-#{$j} {
				padding: $top-bottom $left-right;
			}
		}
	}

	@for $i from 0 through 300 {
		.bora-#{$i} {
			border-radius: $i * 2rpx !important;
		}
	}
</style>
